from poker_bot.core.models.dto import DiscountDTO
from poker_bot.database.uow import SQLAlchemyUoW


class DiscountService:
    def __init__(self, uow: SQLAlchemyUoW):
        self._uow = uow

    async def get_discount_by_id(self, discount_id: int) -> DiscountDTO | None:
        return await self._uow.discount_reader.get_discount_by_id(discount_id)

    async def get_discounts(self) -> list[DiscountDTO]:
        return await self._uow.discount_reader.get_discounts()
